package com.bw.educate.common.es;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "course_base",type = "_doc",shards = 1,replicas = 0)
public class CourseBase {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 课程ID
     */
    @Field(type = FieldType.Long)
    private Long courseId;

    /**
     * 课程名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String courseName;

    /**
     * 课程名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String courseTitle;

    /**
     * 一级分类
     */
    @Field(type = FieldType.Long)
    private Long categoryParentId;

    /**
     * 二级分类
     */
    @Field(type = FieldType.Long)
    private Long categoryChildId;

    /**
     * 课程LOGO
     */
    @Field(type = FieldType.Keyword)
    private String courseLogo;

    /**
     * 课时
     */
    @Field(type = FieldType.Long)
    private Long courseHours;

    /**
     * 分钟
     */
    @Field(type = FieldType.Long)
    private Long timeCount;

    /**
     * 学习人数
     */
    @Field(type = FieldType.Long)
    private Long studentsNumber;

}
